/*
package com.baizhi.app;

import com.baizhi.dao.CategoryMapper;
import com.baizhi.entity.Category;
import com.baizhi.po.VideoPO;
import com.baizhi.service.CategoryService;
import com.baizhi.service.VideoService;
import com.baizhi.util.ImageCodeUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("app")
public class AppCpntroller {

    @Resource
    VideoService videoService;

    @Resource
    CategoryService categoryService;

    @RequestMapping("getPhoneCode")
    public HashMap<String, Object> getPhoneCode(String phone){
        HashMap<String, Object> map = new HashMap<>();
        //根据用户输入的手机号给该用户发送手机验证码

        //日后需要工具类向手机发送验证码
        String phoneCode = null;
        try {
            phoneCode = ImageCodeUtil.getSecurityCode();
            map.put("status","100");
            map.put("message","发送成功");
            map.put("data",phone);
        } catch (Exception e) {
            e.printStackTrace();
            map.put("status","104");
            map.put("message","发送失败");
            map.put("data",null);
        }

        return map;
    }

    @RequestMapping("queryByReleaseTime")
    public HashMap<String, Object> queryByReleaseTime(){
        HashMap<String, Object> map = new HashMap<>();
        try {
            List<VideoPO> videoPOS =videoService.queryByReleaseTime();
            map.put("status","100");
            map.put("message","查询成功");
            map.put("data",videoPOS);
        } catch (Exception e) {
            e.printStackTrace();
            map.put("status","104");
            map.put("message","查询失败");
            map.put("data",null);
        }
        return map;
    }

    @RequestMapping("queryAllCategory")
    public HashMap<String, Object> queryAllCategory(){
        HashMap<String, Object> map = new HashMap<>();

        */
/*try{
            List<Category> categories = categoryMapper.selectAll();
            map.put("status","100");
            map.put("message","查询成功");
            map.put("data",categories);
        }catch (Exception e){
            e.printStackTrace();
            map.put("status","104");
            map.put("message","查询失败");
            map.put("data",null);
        }*//*


        return map;
    }
}
*/
